< previous page page_648 next page >

Page 648
analogy. It is usually easier to understand the more complicated transformations in terms of how they relate to their lower-dimensional counterparts. Once you have mastered two-, three-, and four-dimensional transformations, you will be able to extend them to even higher dimensions.
Homogeneous Coordinates
The most obvious difference between three- and four-dimensional objects is that four-dimensional objects have an extra coordinate. In the rest of this chapter, the fourth coordinate axis is called the W axis. To allow the X, Y, and Z coordinates of a point to retain their usual three-dimensional meanings, the W coordinate of a point is written last as in (x, y, z, w).
As is the case in two and three dimensions, you can manipulate four-dimensional points and transformations most conveniently if you use homogeneous coordinates. All you need to do is add an extra scale factor to the representation of a point in four dimensions. For example, the point (a, b, c, d) is written in homogeneous coordinates as [a * S, b * S, c * S, d * S, S]. You can normalize a point by dividing it by the scale factor S. The usual representation for the point (a, b, c, d) is [a, b, c, d, 1].
As is the case in two and three dimensions, homogeneous coordinates allow you to write many useful four-dimensional transformations as matrices. You can represent translation, scaling, rotation, and projection using matrices. To apply one of these transformations to a point, multiply the point's vector by the corresponding transformation matrix. As before, you can combine transformation matrices by multiplying them to represent complex combinations of translation, scaling, rotation, and projection in a single matrix.
If you apply the four-dimensional identity transformation to any point, that point's coordinates are left unchanged. The matrix representing the four-dimensional identity transformation is:
e10a6a0a59f035e870d90cca05b85fce.gif
 z0668-01.gif
The identity matrix is the basis of many of the more complicated transformations. For instance, you can build a transformation matrix by changing four of the terms in the identity matrix and leaving the rest unchanged.
Translation
Translation in four dimensions is a simple extension of the two- and three-dimensional cases. The transformation matrix representing translation by Tx, Ty, Tz, and Tw in the X, Y, Z, and W directions is:

 
< previous page page_648 next page >